#!/bin/sh

brook_enable=$(uci get brook.@brook[0].enabled 2>/dev/null)

if [ $brook_enable -eq 1 ]; then
	if pidof brook>/dev/null; then
	   /etc/init.d/brookpro reload
	 else
	   /etc/init.d/brookpro restart
  fi
fi
